import Vue from "vue";
import App from "./App.vue";
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
import router from "@/router/index.js";
import axios from 'axios'
import message from '@/until/newMessage.js'
import ZkTable from 'vue-table-with-tree-grid'

axios.defaults.baseURL = 'http://127.0.0.1:8888/api/private/v1/'
axios.interceptors.request.use(config=>{
  config.headers.Authorization = window.sessionStorage.getItem("token");
  return config;
})
Vue.prototype.$axios = axios;
Vue.component("win-tree", ZkTable)  

Vue.use(ElementUI);
new Vue({
  render: (h) => h(App),
  router,
}).$mount("#app");

Vue.prototype.$message = message;
